package adv1;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest2 {
    public static void main(String[] args) {
        String s="我喜欢java";
        byte[] b = s.getBytes();
        for (int i = 0; i < b.length; i++) {
            System.out.print(b[i]+" ");
        }
        System.out.println();
        System.out.println(s.charAt(2));
        // String s3=s.substring(1,3);
        String s3=s.substring(4,5);
        System.out.println(s3);
        String s5="    dd dd    ";
        System.out.println(s5.length());
        String s6=s5.trim();
        System.out.println(s6.length());
    }
}
